package com.abc.final_infor;

public class Test {
    public static void main(String[] args) {
        final int age=10;
        // 使用final修饰的普通局部变量，只能赋值1次
        //age=20;
        System.out.println(age);
        show(10);

        // 使用final修饰引用类型对象，地址值不能改变了，属性值可以改变
        final Student student = new Student("张三", 18);
        //student=new Student("李四",19);
        System.out.println(student);
        student.setName("李四");
        student.setAge(30);
        System.out.println(student);
    }

    public static void show(final double a){
        //a=30;
        System.out.println(a);
    }
}
